Field of the Invention
The present invention relates to an image forming apparatus, a method of controlling the same, and a storage medium, and more particularly to an image forming apparatus that is capable of extending its function by executing an extension application, a method of controlling the same, and a storage medium.
Description of the Related Art
There has been known an MFP as an image forming apparatus that extends its function by having installed thereon a script as an operation program of an extension application. The MFP is provided with an execution environment in which a virtual machine (VM) operates to execute the operation program of the extension application. The MFP converts the installed script to bytecode to thereby generate a bytecoded script which can be interpreted by the VM. When the MFP receives an instruction for starting the extension application, the VM executes the generated bytecoded script, whereby the extension application is started (see e.g. Japanese Laid-Open Patent Publication (Kokai) No. 2013-69077).
Incidentally, the MFP requires a certain time period to complete conversion of a script to bytecode, and hence when a script is installed, the script is converted to bytecode, and the MFP stores the generated bytecoded script. With this, when the MFP receives an instruction for starting the extension application, it is possible to quickly start the extension application by executing the bytecoded script stored in the MFP.
However, in the conventional MFP, if the execution environment is updated to an execution environment which is not compatible with the bytecoded script stored in the MFP, the VM cannot execute the stored bytecoded script, and it is impossible to start the extension application. That is, the conventional MFP has a problem that compatibility with the extension application is impaired.